package com.zretc.service.impl;

import java.util.Map;

import com.zretc.dao.AttentionDao;
import com.zretc.dao.impl.AttentionDaoImpl;
import com.zretc.entity.Attention;
import com.zretc.service.AttentionService;
import com.zretc.util.PageInfo;

/**
 * 关注列表的服务层实现类
 * @author Administrator
 *
 */
public class AttentionServiceImpl implements AttentionService {
	private AttentionDao attentionDao = new AttentionDaoImpl();
	@Override
	public int addAttention(Integer accountId, Integer singerId) {
		
		return attentionDao.insertAttention(accountId, singerId);
	}

	@Override
	public Attention getAttentionByAccountIdAndSingerId(Integer accountId, Integer singerId) {
		return attentionDao.findAttentionByAccountIdAndSingerId(accountId, singerId);
	}

	@Override
	public int deleteAttentionByAccountIdAndSingerId(Integer accountId, Integer singerId) {
		return attentionDao.deleteAttentionByAccountIdAndSingerId(accountId, singerId);
	}

	@Override
	public int attentionCount(Integer accountId) {
		return attentionDao.attentionCount(accountId);
	}

	@Override
	public PageInfo<Attention> getAttentionByAccountId(Map<String, String> map) {
		return attentionDao.findAttentionByAccountId(map);
	}

}
